.login-container {
  min-height: 100vh;
  background: #fff;
  box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.05);
  position: relative;

  .content {
    padding: calc(100rpx + env(safe-area-inset-top)) 40rpx;
  }

  .header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40rpx;

    .logo {
      width: 280rpx;
      height: 280rpx;
      margin-bottom: 40rpx;
    }

    .main-title {
      font-size: 44rpx;
      font-weight: 600;
      color: $uni-color-title;
      letter-spacing: 2rpx;
    }

    .sub-title {
      font-size: 28rpx;
      color: $uni-text-color-disable;
    }
  }

  .identity-section {
    margin-bottom: 60rpx;

    .section-title {
      font-size: 32rpx;
      color: $uni-color-title;
      margin-bottom: 32rpx;
      font-weight: 600;
      text-align: center;
    }

    .identity-options {
      display: flex;
      justify-content: space-between;
      gap: 24rpx;

      margin-top: 32rpx;

      .identity-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 40rpx 24rpx;
        border-radius: 20rpx;
        border: none;
        background: #fff;
        box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
        transition: all 0.3s;

        &:hover {
          transform: translateY(-6rpx);
        }

        &.active {
          border: 2rpx solid #3c9cff;
          transform: translateY(-6rpx);
          box-shadow: 0 8rpx 30rpx rgba(60, 156, 255, 0.15);
        }

        .identity-text {
          font-size: 28rpx;
          color: #333;
          margin: 20rpx 0 12rpx;
          font-weight: 500;
        }

        .identity-desc {
          font-size: 24rpx;
          color: #999;
          text-align: center;
        }
      }
    }
  }

  .login-section {
    margin-bottom: 30rpx;

    .wx-login-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12rpx;
      height: 88rpx;
      background: linear-gradient(45deg, #07c160, #09d66d);
      box-shadow: 0 6rpx 16rpx rgba(7, 193, 96, 0.2);
      border-radius: 44rpx;
      color: #fff;
      font-size: 27rpx;
      font-weight: 500;

      &:active {
        transform: scale(0.98);
      }
    }

    .merchant-login-form {
      .input-group {
        margin-bottom: 32rpx;
        position: relative;

        :deep(.uv-input) {
          background-color: #f8f9fa;
          border-radius: 12rpx;
          padding: 24rpx;
          transition: all 0.3s ease;
          border: 2rpx solid transparent;

          &:hover {
            border-color: #a0cfff;
          }

          .input-icon {
            transition: all 0.3s ease;
          }

          .uv-input__content__prefix-icon,
          .uv-input__content__suffix-icon {
            padding: 0 12rpx;
          }

          .uv-input__content__field {
            font-size: 28rpx;
            color: #333;

            &::placeholder {
              color: #999;
            }
          }

          &:focus-within {
            border-color: #3c9cff;
            background: #fff;
            box-shadow: 0 0 0 2rpx rgba(60, 156, 255, 0.1);
          }
        }

        .error-tip {
          position: absolute;
          left: 0;
          bottom: -36rpx;
          font-size: 24rpx;
          color: #ff4d4f;
        }
      }

      .merchant-login-btn {
        width: 100%;
        height: 88rpx;
        line-height: 88rpx;
        background: linear-gradient(45deg, #3c9cff, #54a9ff);
        box-shadow: 0 6rpx 16rpx rgba(60, 156, 255, 0.2);
        border-radius: 44rpx;
        color: #fff;
        font-size: 27rpx;
        margin-top: 40rpx;
        font-weight: 500;

        &:active {
          transform: scale(0.98);
        }
      }

      .form-footer {
        display: flex;
        justify-content: flex-end;
        margin-top: 20rpx;

        .forget-pwd {
          font-size: 24rpx;
          color: #3c9cff;
        }
      }
    }
  }

  .merchant-register {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20rpx;
    margin-bottom: 30rpx;

    .register-text {
      font-size: 26rpx;
      color: #666;
    }

    .register-btn {
      font-size: 26rpx;
      color: #3c9cff;
      margin-left: 12rpx;
      font-weight: 500;
      position: relative;

      &::after {
        content: '';
        position: absolute;
        bottom: -4rpx;
        left: 0;
        width: 100%;
        height: 2rpx;
        background: #3c9cff;
        transform: scaleX(0);
        transition: transform 0.3s;
      }

      &:hover::after {
        transform: scaleX(1);
      }

      &:active {
        opacity: 0.8;
      }
    }
  }

  .agreement-text {
    font-size: 24rpx;
    color: #999;
    text-align: center;
    line-height: 50rpx;

    .link {
      color: #3c9cff;
      position: relative;

      &::after {
        content: '';
        position: absolute;
        bottom: -2rpx;
        left: 0;
        width: 100%;
        height: 1rpx;
        background: currentColor;
        opacity: 0.5;
      }
    }
  }
}

.agreement-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8rpx;
  margin-top: 40rpx;

  &.shake {
    animation: shake 0.82s cubic-bezier(.36, .07, .19, .97) both;
  }

  .checkbox {
    display: flex;
    align-items: center;
    padding: 4rpx;
  }

  .agreement-text {
    font-size: 24rpx;
    color: #999;

    .link {
      color: #3c9cff;

      &:active {
        opacity: 0.8;
      }
    }
  }
}

@keyframes shake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}